<?php 


header("Content-type: text/html; charset=utf-8");

//打印数据的简化方法
function D($data)
{
	var_dump($data);
}

//计算脚本运行时间
function countTime()
{
	static $time=0;

	if($time){
		echo microtime(true)-$time;
	}else{
		$time = microtime(true);
	}
}

// 存储单位转换
function F($size)
{
	if($size>pow(1024,3)){
		return round($size/pow(1024,3),1)."GB";
	}elseif($size>pow(1024,2)){
		return round($size/pow(1024,2),1)."MB";
	}elseif($size>pow(1024,1)){
		return round($size/pow(1024,1),1)."KB";
	}else{
		return $size."B";
	}
}

// 获取网站配置信息
function C($option)
{
	$configs = include '../Config/Config.php';

	if(isset($configs[$option])){
		return $configs[$option];
	}else{
		return "配置文件中无".$option."配置";
	}
}

function M($value='')
{
	# code...
}


function success($url='/' , $msg='恭喜，中奖了！')
{
	include './Tp/success.html';
}

function error($url='/' , $msg='出错了，找找吧')
{
	include './Tp/error.html';
}

















 ?>